import ajax from "../service/ajax.js";

export default {
    namespaced: true, //允许使用命名空间
    state: {
      userList:{},
      userParam:{pageNo:'1',pageSize:'',power:''},
    },
    mutations: {
      setUserList(state,user){
        state.userList = user
      },
      setUserParam(state,user){
        state.userParam = user
      },
    },
    actions: {
      async findAllUser(context){
        let userInfo = await ajax.getSubmit("/api/user/findAll",context.state.userParam)
        context.commit("setUserList",userInfo)
      },
    },
  };
  